package com.woniu.service.Impl;

import com.woniu.dao.CreditContractDao;
import com.woniu.dao.CreditMessageDao;
import com.woniu.entity.CreContract;
import com.woniu.entity.CreMessage;
import com.woniu.entity.CreProduct;
import com.woniu.service.CreditMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class CreditMessageServiceImpl implements CreditMessageService {
    @Autowired
    CreditMessageDao creditMessageDao;

    @Override
    public List<CreMessage> findAllMessage(CreMessage creMessage) {

        return creditMessageDao.findAllMessage(creMessage);

    }

    @Override
    public List<CreMessage> readMessage(CreMessage creMessage) {
        return creditMessageDao.readMessage(creMessage);
    }

    @Override
    public CreMessage findMessageById(int id) {
        return creditMessageDao.findMessageById(id);
    }

    @Override
    public int editOneType(String readStatus, Integer id) {
        return creditMessageDao.editOneType(readStatus,id);
    }
}